xen/iommu: smmu: Silence clang in arm_smmu_device_dt_probe()
authorJulien Grall <jgrall@amazon.com>
Fri, 2 Apr 2021 15:51:06 +0000 (16:51 +0100)
committerJulien Grall <jgrall@amazon.com>
Tue, 13 Apr 2021 17:57:59 +0000 (18:57 +0100)
commit264aa183ad85b2779b27d1312724a291259ccc9f
tree944a242dbcabd7fb630955ecbf155b152b2e2ef2
parenta33ad60cc3c2a107b43f9c368b1718eda3282760
xen/iommu: smmu: Silence clang in arm_smmu_device_dt_probe()

Clang 11 will throw the following error:

smmu.c:2284:18: error: cast to smaller integer type 'enum arm_smmu_arch_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
        smmu->version = (enum arm_smmu_arch_version)of_id->data;
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The error can be prevented by initially casting to (uintptr_t) and then
enum.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/drivers/passthrough/arm/smmu.c